package han_meng_fei_sha.wai_mai_shun_feng_che;
import android.content.Context;
import android.view.View;

import han_meng_fei_sha.wai_mai_shun_feng_che.activity.Home;
import han_meng_fei_sha.wai_mai_shun_feng_che.activity.LuXian;
import han_meng_fei_sha.wai_mai_shun_feng_che.activity.MuDiDi;
import han_meng_fei_sha.wai_mai_shun_feng_che.activity.Pay;
import han_meng_fei_sha.wai_mai_shun_feng_che.activity.Wait;
/**
 韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha
 on 2017/11/5.
 */
public class 点击监听器 implements View.OnClickListener
{
    Context 环境;
    public 点击监听器(Context 环境)
    {
        this.环境=环境;
    }
    @Override
    public void onClick(View view)
    {
        if(环境==null)return;
        MyApp.提示工具.长提示美化版("点击了");
        if(环境 instanceof MuDiDi){
            LuXian.启动该页面(环境);
            return;
        }
        if(环境 instanceof LuXian){
            Pay.启动该页面(环境);
            return;
        }
        if(环境 instanceof Pay){
            Pay pay =(Pay)环境;
            int id =pay.get单选组().getCheckedRadioButtonId();
            if(id == R.id.单选微信){
                MyApp.提示工具.长提示美化版("单选微信");
            }
            if(id == R.id.单选支付宝){
                MyApp.提示工具.长提示美化版("单选支付宝");
            }
            pay.finish();
            Wait.启动该页面(环境);
            return;
        }
        if(环境 instanceof Wait){
            Wait pay =(Wait)环境;
            pay.finish();
            Home.启动该页面(环境);
            return;
        }
    }
}
